<?php


/**
 * This class defines the structure of the 'restaurant' table.
 *
 *
 *
 * This map class is used by Propel to do runtime db structure discovery.
 * For example, the createSelectSql() method checks the type of a given column used in an
 * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
 * (i.e. if it's a text column type).
 *
 * @package    orm.map
 */
class RestaurantTableMap extends TableMap {

	/**
	 * The (dot-path) name of this class
	 */
	const CLASS_NAME = 'orm.map.RestaurantTableMap';

	/**
	 * Initialize the table attributes, columns and validators
	 * Relations are not initialized by this method since they are lazy loaded
	 *
	 * @return     void
	 * @throws     PropelException
	 */
	public function initialize()
	{
	  // attributes
		$this->setName('restaurant');
		$this->setPhpName('Restaurant');
		$this->setClassname('Restaurant');
		$this->setPackage('orm');
		$this->setUseIdGenerator(true);
		// columns
		$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, 11, null);
		$this->addColumn('NAME', 'Name', 'VARCHAR', false, 70, null);
		$this->addColumn('ADDRESS', 'Address', 'VARCHAR', false, 255, null);
		$this->addForeignKey('CITY_ID', 'CityId', 'INTEGER', 'city', 'ID', false, 11, null);
		$this->addForeignKey('STATE_ID', 'StateId', 'INTEGER', 'state', 'ID', false, 11, null);
		$this->addColumn('AREA', 'Area', 'VARCHAR', false, 255, null);
		$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
		$this->addColumn('HIGHLIGHTS', 'Highlights', 'LONGVARCHAR', false, null, null);
		$this->addColumn('NO_OF_SCREENS', 'NoOfScreens', 'INTEGER', false, 11, null);
		$this->addColumn('NO_OF_PAX', 'NoOfPax', 'INTEGER', false, 11, null);
		$this->addColumn('NO_OF_TABLES', 'NoOfTables', 'INTEGER', false, 11, null);
		$this->addColumn('PHONE_NUMBER', 'PhoneNumber', 'VARCHAR', false, 60, null);
		$this->addColumn('LATITUDE', 'Latitude', 'VARCHAR', false, 15, null);
		$this->addColumn('LONGITUDE', 'Longitude', 'VARCHAR', false, 15, null);
		$this->addColumn('CONTACT_PERSON', 'ContactPerson', 'VARCHAR', false, 100, null);
		$this->addColumn('ADDED_DATE', 'AddedDate', 'DATE', false, null, null);
		$this->addColumn('IS_ACTIVE', 'IsActive', 'CHAR', false, 1, 'Y');
		$this->addColumn('IS_DELETED', 'IsDeleted', 'CHAR', false, 1, 'N');
		// validators
	} // initialize()

	/**
	 * Build the RelationMap objects for this table relationships
	 */
	public function buildRelations()
	{
    $this->addRelation('City', 'City', RelationMap::MANY_TO_ONE, array('city_id' => 'id', ), null, null);
    $this->addRelation('State', 'State', RelationMap::MANY_TO_ONE, array('state_id' => 'id', ), null, null);
    $this->addRelation('RestaurantSeating', 'RestaurantSeating', RelationMap::ONE_TO_MANY, array('id' => 'restaurant_id', ), null, null);
    $this->addRelation('RestaurantLogin', 'RestaurantLogin', RelationMap::ONE_TO_MANY, array('id' => 'restaurant_id', ), null, null);
    $this->addRelation('RestaurantOffer', 'RestaurantOffer', RelationMap::ONE_TO_MANY, array('id' => 'restaurant_id', ), null, null);
    $this->addRelation('Menu', 'Menu', RelationMap::ONE_TO_MANY, array('id' => 'restaurant_id', ), null, null);
	} // buildRelations()

} // RestaurantTableMap
